﻿@model PersonBlog.Model.UserModel

@{
    Layout = null;
}

<!DOCTYPE HTML>
<html>
<head>
    <title>注册</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Modern Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <!-- Bootstrap Core CSS -->
    <link href="~/css/bootstrap.min.css" rel='stylesheet' type='text/css' />
    <!-- Custom CSS -->
    <link href="~/css/style.css" rel='stylesheet' type='text/css' />
    <link href="~/css/font-awesome.css" rel="stylesheet">
    <!-- jQuery -->
    <script src="~/js/jquery.min.js"></script>
    <script src="~/js/layer/layer.js"></script>
    <!---//webfonts--->
    <!-- Bootstrap Core JavaScript -->
    <script src="~/js/bootstrap.min.js"></script>
    <script>
        function Valid() {
            var name = $("#Name").val();
            var loginname = $("#LoginName").val();
            var pwd = $("#Pwd").val();
            if (name == null || name == undefined || name == '') {
                layer.msg("用户姓名不能为空！");
                return;
            }
            if (loginname == null || loginname == undefined || loginname == '') {
                layer.msg("用户登录名不能为空！");
                return;
            }
            if (pwd == null || pwd == undefined || pwd == '') {
                layer.msg("用户登录密码不能为空！");
                return;
            }
        }

        function check() {
            var pwd = $("#Pwd").val()
            var repwd = $("#RePwd").val();
            if (pwd != repwd) {
                layer.msg("两个登录密码不一致，请检查！")
                return;
            }
        }
    </script>
</head>
<body id="login">
    <div class="login-logo">
        @*<a href="index.html"><img src="~/images/logo.png" alt=""  width="20%" height="20%" /></a>*@
    </div>
    <h2 class="form-heading">注 册</h2>
    @using (Html.BeginForm("Regeister", "", FormMethod.Post,new {@class= "form-signin app-cam" }))
    {
        <p>请输入你的个人信息</p>
            @Html.TextBoxFor(m => m.UserName, new { @class = "form-control1", @placeholder = "姓名", @id = "Name" })
            @Html.TextBoxFor(m => m.LoginName, new { @class = "form-control1", @placeholder = "登录名", @id = "LoginName" })
            @Html.TextBoxFor(m => m.LoginPwd, new { @class = "form-control1", @placeholder = "登录密码", @id = "Pwd", @type = "password" })
            <input type="password" class="form-control1" placeholder="确认登录密码" id="RePwd" autofocus="" onblur="check();">

            <button class="btn btn-lg btn-success1 btn-block" type="submit" onclick="Valid();">提   交</button>
            <div class="registration">
                已经注册。
                <a class="" href="@Url.Action("Index","Login")">
                    登录
                </a>
            </div>
    }
</body>
</html>

